[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
MKDATE(IEXP1,IEXP2,IEXP3) (DATE)
Function
Create a complete date from separate year, month and day values.
Syntax
MKDATE(year,month,day)
year = An integer expression with the year (1900 through 2079).
month = An integer expression with the month (1 through 12).
day = An integer expression with the day of the month (1 through 31).
Return Type & Value
DATE
Returns a date made from the specified year, month and day values.
Remarks
Although PPL does it's best to automatically convert values from one
type to another as needed, converting STRING values to DATE values
presents a special problem because of the year portion of the date.
Normally the year is only expressed in a two digit format. This limits
the automatic convertion to a single 100 year period. PCBoard uses year
values greater than or equal to 80 as 20th century (19XX) dates, and year
values less than 80 as 21st century (20XX) dates. Since you may need to
access dates prior to 1980 (when processing birthdates, for example),
this function allows you to take three integers (year, month and day) and
build any date necessary.
Examples
PRINTLN "My birthdate is ",MKDATE(1967,10,31)
INTEGER y,m,d
INPUTINT " Your birth year",y,@X0E
INPUTINT "Your birth month",m,@X0E
INPUTINT " Your birth day",d,@X0E
PRINTLN "Your birthdate is ",MKDATE(y,m,d)
IF (MKDATE(y,m,d) < MKDATE(1967,10,31)) THEN
PRINTLN "You are older than me"
ELSE IF (MKDATE(y,m,d) > MKDATE(1967,10,31)) THEN
PRINTLN "I am older than you"
ELSE
PRINTLN "We are the same age"
ENDIF
See Also:
VARADDR
VAROFF
VARSEG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson